const fs = require('fs')
function mineReadFile(path){
    return new Promise((resolve,reject)=>{
        fs.readFile(path,(err,data)=>{
        if (err){
            reject(err)
        }
        resolve(data.toString())
        })
    })
}


//async/await
async function main(){
    p1 = await mineReadFile('./fs1.txt')
    console.log(p1)
    p2 = await mineReadFile('./fs2.txt')
    console.log(p2)
    p3 = await mineReadFile('./fs3.txt')
    console.log(p3)
   
}
main()